<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$admin_title}</title>
<include file="./core/Modules/Center/Tpl/Public/js_css_header.html" />
<script type="text/javascript">
	
	function passCheck(idVal,cidVal) {
		jConfirm("确定设置为已联系？", 'Confirmation Dialog', function(r) {
			if(r == true){
				$.post("__APP__/center/reserve/docheck/",{id:idVal,cid:cidVal ,time: new Date().getTime() },function(data){
					if(data.status == 1){	//成功处理流
				    	$("#check_span"+idVal).html("已联系").css("color","green");
				    }else if(data.status == 4){	//刷新当前页
				    	window.location.reload();
				    }else{
				    	alert(data.msg);
				    }
				},"JSON");
			}
		});
	}
	
</script>
</head>

<body>
	<include file="./core/Modules/Center/Tpl/Public/header.html" />
	<div class="cont_wrap">
		<div class="position">当前位置:&nbsp;{$location}</div>
		<table width="100%" border="0" cellpadding="0" cellspacing="1" class="list_table_line">
          <tr>
            <td width="5%" class="table_head"><div align="center"><span>序号</span></div></td>
            <foreach name="reserve_module_field" item="field">
            <td class="table_head"><div align="center"><span>{$field.field_desc}</span></div></td>
            </foreach>
			<td width="15%" class="table_head"><div align="center"><span>状态</span></div></td>
			<td width="10%" class="table_head"><div align="center"><span>时间</span></div></td>
            <td width="15%" class="table_head"><div align="center">基本操作</div></td>
          </tr>
          <!-- 列表循环开始 -->
		  <foreach name="pagination.resultList" item="obj">
		  <tr class="line" bgcolor="#FFFFFF">
            <td class="list_td_height"><div align="center">{$obj.id}</div></td>
            <foreach name="reserve_module_field" item="field">
            <td><div align="center"><php>echo $obj[$field['field_name']];</php></div></td>
            </foreach>
			<td>
			<div align="center">
				<if condition="$obj.reserve_status eq 0">
					<strong id="check_span{$obj.id}" style="color:gray;">
						<input type="button" name="passed" value="标识为已联系" onclick="passCheck({$obj.id},{$obj.catalog_id})"/>
					</strong>
				<else/>
					<strong id="check_span{$obj.id}" style="color:green;">已联系</strong>
				</if>
			</div>
			</td>
			<td><div align="center">{$obj.timeline}</div></td>
            <td><div align="center"><a href="__APP__/center/reserve/detail/?cid={$Think.get.cid}&id={$obj.id}" target="_blank">[查看详细]</a>&nbsp;<a href="javascript:toConfirm('是否确定删除该数据？','__APP__/center/reserve/delete/?cid={$Think.get.cid}&id={$obj.id}','__APP__');" target="_self">[删除]</a></div></td>
          </tr>
		  </foreach>
		  <!-- 列表循环结束 -->
         </table>
	     <div style="margin-top: 10px;">{$pagination.htmlurl}</div>
	</div>
</body>
</html>
